#include <iostream>
#include "entry.h"
#include "literals.h"

entry::entry(std::string type, std::string name, std::string value)
    : type(type), name(name), value(value)
{
}

void entry::input_data()
{
    std::cout << literals::entry::input_tip_begin
        << name << literals::entry::input_tip_end;

//    std::cin >> value;
    std::getline(std::cin, value);
}

std::string entry::to_console_str() const
{
    return name + literals::con_separator + value;
}

std::string entry::to_db_str() const
{
    return type + literals::db_separator + value;
}